from django.db import models
import django.utils.timezone as timezone


class Department(models.Model):
    name = models.CharField(max_length=120, verbose_name='部门名称')
    leader = models.CharField(max_length=60, verbose_name='负责人')
    phone = models.IntegerField(verbose_name='手机号')
    region = models.CharField(max_length=60, verbose_name='区域')
    address = models.CharField(max_length=200, null=True,
                               blank=True, verbose_name='地址')
    longitude = models.DecimalField(max_digits=9, decimal_places=6,
                                    null=True, blank=True, verbose_name='经度')
    latitude = models.DecimalField(max_digits=8, decimal_places=6,
                                   null=True, blank=True, verbose_name='纬度')
    createDate = models.DateTimeField(default=timezone.now,
                                      verbose_name='创建日期')
